#include "scene_mgr.h"
#include "node_rootnode.h"
#include "xsys_log.h"


namespace xge{
namespace graphics{


  SceneManager::SceneManager() {
    root_ = new RootNode();
    SetFPS(60);
  }

  SceneManager::~SceneManager() {
    delete root_;
  }

  void SceneManager::Loop( const Timer::tick_t& diff_time ) {
    cur_time_+=diff_time;
    if( cur_time_ > fps_per_tick_ ) {
      root_->OnPaint(fps_per_tick_);
      cur_time_ -= fps_per_tick_;
    }
  }



}//namespace graphics
}//namespace xge